Proportional-integral-derivative controller having adaptive control capability

ABSTRACT

Apparatus for controlling at least one variable output parameter in response to a variable predetermined input parameter in a process system, such as a digital thermostat. The apparatus provides adaptive control of the output variable by utilizing a controller means that includes an adaptive controller means, an identifier means and a tuner means. The identifier means defines a model having parameters which represent the operational characteristics of the process system, and the identifier means monitors the operation of the adaptive controller means and selectively changes the parameters of said model to improve the operation of the adaptive controller means. The tuner means receives the model parameters from the identifier means and calculating robust and reliable values of said predetermined gain factors and applying the same to the adaptive controller means for use thereby.

CROSS REFERENCE TO RELATED APPLICATIONS

Direct Digital Control Thermostat, Ser. No. 08/078,605 filed Jun. 16,1993, by Gorski, et al.

This is a CIP application of application having Ser. No. 08/279,716,filed Jul. 25, 1994, which is a CIP application of Ser. No. 08/078,733,filed Jun. 16, 1993, both now abandoned.

FIELD OF THE INVENTION

The present invention generally relates to a process controller that haseither proportional-integral control functionality orproportional-integral-derivative control functionality, and moreparticularly to such a controller that has adaptive control capability.

There has been a need for controllers for controlling a single variablein many kinds of processes that provides effective control. One of theapplications for such controllers is readily apparent to all individualsin an indoor environment is that of temperature control. Ineffectivetemperature control of an indoor environment is readily apparent tothose who are uncomfortable, and there is a continuing need foreffective control of heating, ventilating and air conditioning systemsin all types of buildings.

Controllers have been developed which are increasingly moresophisticated, and with advancements in electronic technology, morerobust control capability can be achieved and implemented at reasonablecost. Controllers which control a single loop, i.e., control a singlevariable such as temperature, humidity or the like, by controlling anoutput have been implemented, and improved control has been achieved byimplementing control schemes which include three separate factors orcomponents. These include a proportional gain factor, an integral gainfactor and a derivative gain factor. Such PID controllers can providebetter control because they determine the derivative as well as theintegral of change of the error over time, in addition to the error thatis determined at a particular time, to control the controlled variable.

While such PID controllers offer many advantages over controllers whichmerely provide proportional control, there is a need for improved PIDcontrollers for particular applications and uses.

Accordingly, it is a primary object of the present invention to providean improved PID controller that has adaptive control capability that hasmany possible applications.

Another object of the present invention is to provide an improved PIDcontroller having adaptive control capability that is particularlysuited for controlling a single control loop, i.e., a single variable iscontrolled and provides a single output.

Yet another object of the present invention is to provide such animproved adaptive controller for controlling a single loop, but also hasthe capability of operating in series with other single control loops.

Still another object of the present invention is to provide such animproved adaptive controller that has the capability of operating in acascaded configuration of control loops.

Another object of the present invention is to provide such an improvedadaptive controller that utilizes an internal model of the applicationthat is to be controlled, which model matches the expected application,and which during operation, tunes itself in response to load, equipmentor time changes.

A related object lies in the provision of examining the input, comparingthe input with what it should be and then changes the parameters withinthe internal model to move actual conditions closer to the desiredcondition, and provide control of the output in accordance with thechanged internal model.

A detailed object of the present invention is to provide an improvedthermostat which also has the capability of providing adaptive control,i.e., during operation, it will monitor itself in terms of itseffectiveness in control, and will generate more effective operatingparameters within specific algorithms to provide more accurate control.

Other objects and advantages will become apparent from the ensuingdetailed description, while referring to the attached drawings, inwhich:

FIG. 1 is a perspective view of a thermostat embodying the presentinvention;

FIG. 2 is a schematic diagram of a unit ventilator shown with athermostat embodying the present invention;

FIG. 3 is a perspective view of internal structure of the thermostatshown in FIG. 1;

FIGS. 4a, 4 b and 4 c together comprise a detailed electrical schematicdiagram of the circuitry of a thermostat embodying the presentinvention;

FIG. 5 is a block diagram of the adaptive loop control system showingthe relationship between the control system and the room;

FIG. 6 is a block diagram of the adaptive controller;

FIG. 7 is a detailed flow chart of the adaptive controller, andparticularly illustrating the controller shown in FIG. 6;

FIG. 8 is a detailed flow chart of the adaptive control system andparticularly illustrating the identifier shown in FIG. 6.

DETAILED DESCRIPTION

The present invention is directed to a PID controller that has adaptivecontrol capability. The controller may be operated in many PID processcontrol applications, and is ideally suited for various applications inthe HVAC art. It is adapted for use in controlling a single loop, i.e.,controlling one variable with one output, and can be optimized for aparticular application such as room temperature control. Other examplesof use where a single adaptive loop is desirable and for which thepresent invention is suited are: room temperature control of a unitventilator or a constant volume damper application; humidity control ina duct or room; discharge air temperature control by controlling avalve, coil or bypass damper; flow control; mixed air/water control; andstatic pressure control.

Single adaptive loops can be strung together in series. For example, oneadaptive loop can control the air temperature in a supply duct, whileanother can control the temperature of a room by modulating a damper inthe supply duct. Such series loops are not interlocked and can becontrolled by two separate control algorithms. Single adaptive loops canbe interlocked in a cascade arrangement. For example, a unit ventilatoruses discharge temperature control, and one adaptive loop can controlthe discharge air temperature by modulating a coil valve or bypassdamper. Another adaptive loop can control the room temperature bysetting the discharge air temperature setpoint for the inner adaptiveloop. Such cascaded adaptive loops can also be used in dual ductcontrol, and can be controlled by one controller running both adaptivealgorithms.

While the present invention is suited for the above applications, aswell as others, the present detailed description describes anapplication of the controller in a thermostat of the type which can beused in a unit ventilator of the type which has pneumatic controls.

It is well known that many building heating, ventilating and airconditioning systems are controlled through the use of pneumaticcontrols wherein the pressure in the pneumatic lines are controlled andthe variable pressure in turn controls pneumatic control valves. Thecontrol valves are then used to control the position of dampers, as wellas valves which admit heat to heating coils and the like. Prior artthermostats for such systems have the capability of adjusting thetemperature set point for the room or other enclosed area which thethermostats are intended to control, and the thermostats normallyoperate to provide a controlled pressure in a pneumatic line which isconnected to control elements such as dampers, valves and the like andsuch thermostats operate to admit increased pressure from a pneumaticsupply line for the purpose of increasing the temperature and todecrease the pressure in the control line when the temperature is to bereduced. The controlled pneumatic pressure typically adjusts theposition of the valves, dampers and the like to regulate the temperaturein the controlled area. Additionally, there are many buildings which arecontrolled by pneumatic thermostats which control the operation of unitventilators, such as are often used in schools. Such unit ventilatorsare typically stand-alone units and have a fan for circulating air, aheating coil through which steam or hot water may circulate with theamount of flow therethrough being regulated by a valve. While suchmechanical pneumatic thermostats adequately control the temperature inthe area which they are located, they are generally stand-alone unitsfrom a system standpoint, except for the capability of being switchedbetween day/night operation by changing the pressure in the supplypneumatic lines, as is well known in the art.

The controller embodying the present invention can be incorporated intoa digital thermostat which is capable of use in a pneumaticallycontrolled temperature control system of the type which has a pneumaticsupply line which extends to various components of the control systemand wherein the control elements of the system are controlled by varyingthe control pressure that is communicated to such elements. For example,pressure within pneumatic control lines may vary to adjust the positionof dampers, control valves or the like which control the volume ofsteam, air and water to heating coils, radiators or the like, or in thecase of dampers, controlling the amount of air that is forced into thespace that is being controlled.

Such systems generally have been controlled by a pneumatic thermostatthat is essentially mechanical in nature and wherein adjustment of theset point for the desired temperature has been performed by manualmanipulation and except for the capability of providing day/night modesof operation, very little control is possible through the thermostat.The thermostat embodying the present invention is intended to beoperable with such a pneumatic control system and is capable ofstand-alone operation or with an integrated supervisory and controlsystem if desired. Because of its superior design, it is capable ofbeing merely substituted for a prior pneumatic thermostat without anyother alterations or modifications to the control elements or theheating apparatus.

The thermostat embodying the present invention can be substituted for apneumatic mechanical thermostat which controls a unit ventilator of thetype which has been commonly used in school systems and the like. Suchunit ventilators generally have a fan, a heating coil of which theheating element is steam, hot water or electrical. Such unit ventilatorsgenerally do not provide air conditioning in the true sense, but haveoutside dampers which are capable of admitting outside air which mayoften be cooler than air in the room. Typically, such unit ventilatorsare operable in a stand-alone mode and do not have system-widecapabilities which are extremely desirable in terms of efficient energyusage.

Another advantage of the thermostat is that it can be either batterypowered or can be connected to an independent power source and it canalso be connected via a two wire cable to a communication network,commonly a local area network or LAN, so that it can be operated as apart of a total supervisory and control system. The thermostat embodyingthe present invention includes a processing means having internal memoryand is therefore capable of running relatively complex controlalgorithms which are capable of providing proportional control, integralcontrol, as well as derivative control, among other control schemes,such as a Smith predictor type of control scheme.

Day/night and heat/cooling modes of operation can be achieved, withdifferent temperature set points for each mode of operation. Thethermostat is manually adjustable so that its set point can be adjustedat the location of the thermostat to suit individual needs if desired,or it can be programmed so that it is not responsive to such individualcontrols during certain time periods or the like.

Turning now to the drawings, and particularly FIG. 1, a thermostatembodying the present invention, indicated generally at 10, isillustrated and includes an outer enclosure 12 having opposite end walls14, opposite sidewalls 16 and a front wall 18. The sidewalls preferablyhave a plurality of openings 20 therein through which air may pass sothat a temperature sensing device located within the enclosure willmeasure the temperature of ambient air in the area which the thermostatis intended to control. In the front face 18 of the thermostat 10, adisplay 22 is shown.

The display is preferably a liquid crystal display which will illustratethe time and current temperature, but may display other information,including the temperature set point of the thermostat, whether it isoperating in one of the day or night control modes and the like. Thethermostat preferably has a pair of switches 24 and 26, which areillustrated to be up and down arrows and are provided to enable thetemperature set point of the thermostat to be either increased ordecreased upon pushing the appropriate pushbutton.

Since the thermostat must effectively interface pneumatic lines andelectrical circuitry, it is preferred that the electronic components beconstructed using a printed circuit board such as is shown in FIG. 3. Aprocessing means 28 is provided, as is a temperature sensing device,preferably a pair of thermistors 30 and other electrical components,which are illustrated in FIG. 4, and which are mounted on a printedcircuit board 32, but which are not shown in detail in FIG. 3.Connectors 33 are provided for connection to the display 22 and switches24 and 26, with the number illustrated in FIG. 3 not being the totalnumber of such connectors but being diagrammatic of the intendedconstruction. It should be understood that a ribbon or zebra connector35 may be utilized or other appropriate conductors and connectors whichare well known in the art.

The connectors 34 are intended to connect the circuitry of the printedcircuit board 32 with the electrical pneumatic components that areattached to a base 36 and additional connectors 38 are provided toprovide connection to the local area network and to a source of power.The base 36 has a number of openings, not shown, through which the powerand LAN connectors may pass. The base plate also has internal ports towhich pneumatic lines can be attached, and to this end, the pneumaticsupply port 44 is shown connected to an electropneumatic valve 46 towhich another pneumatic port 48 is attached and which comprises thecontrolled output. The port 48 is also connected to a second valve 50which in turn is connected to a bleed port 52.It should be understoodthat the electropneumatic valves 46 and 50 are shown to be generallycylindrical and may be in the form of conventional solenoid valves.However, it should be understood that any suitable control device may beused which is operable in response to appropriate electrical signalsbeing applied thereto. It is conventional practice that the pneumaticpressure in the control port 48 is variable within the range of thesupply pressure and atmospheric pressure, and the controlled pressuremay be adjusted by operating one or the other of the control valves 46and 50.

The valves operate to selectively communicate air among the ports 44, 48and 52 when they are open and isolate one from another when they areclosed. In this regard, the pressure in the controlled output port 48may be increased by opening the valve 46 which communicates the highersupply pressure to the controlled output port. Similarly, if it isintended to decrease the control pressure within the port 48, the valve50 may be opened to bleed pressure to atmosphere via port 52. The outputport 48 may have a small molded manifold piece which is in communicationwith port 48 and which also includes a pneumatic transducer element,diagrammatically illustrated at 54, for providing an electrical signalto the circuitry of FIG. 4 which is indicative of the controlledpressure in port 48.

The thermostat 10 is adapted for use with apparatus such as a unitventilator, the schematic diagram of which is shown in FIG. 2, and whichhas a fan 60 and a pneumatic electric switch 62, for turning the fan onwhen it is otherwise placed in condition for operation. The thermostat10 is shown with power lines 64 and LAN lines 66 which can be connectedto a remote central control station 67. The thermostat 10 has apneumatic supply line 44′ attached to port 44 and an output line 48′attached to port 48, which line 48′ extends to a valve 68that admits hotwater, steam or the like to a heating coil 70. The pneumatic line 48′also extends to a pneumatically controlled damper control 72 and toanother valve 74 which controls the flow of steam, hot water or the liketo an auxiliary radiation coil 76.

With respect to the electrical schematic circuitry of the thermostat 10,and referring to FIGS. 4a, 4 b and 4 c, the circuit components whichhave been previously identified have been given the same referencenumerals in this figure for consistency. The circuitry is driven by theprocessing means 28, (FIG. 4a) which is preferably a model 68HC11micro-controller manufactured by Motorola. The micro-controller isdriven by a clock circuit comprising a crystal 80 that is connected topins 7 and 8. Pins 9-15 extend to the display 22, via a display driverintegrated circuit of conventional design which is not shown.

The valves 46 and 50 are illustrated in FIG. 4a as being solenoid valvesand the solenoid which increases the pressure 46 is driven by lines frompins 37 and 38, through a driver circuit 82, while lines from pins 35and 36 operate the pressure reducing solenoid 50. In this regard, whenthe solenoid is initially actuated, the up line from pin 37 is activatedand it is held by a signal on line from pin 38. The circuitry alsoincludes a power up/down reset circuit 84. Power lines 64 (FIG. 4c) arepreferably 24 volt alternating current lines that are applied to a fullwave rectifier, indicated generally at 86, (FIG. 4c) which is applied toa switching mode power supply circuit 88, preferably a Model MC34129manufactured by Motorola. It supplies plus and minus 5 Volts D.C. (VDC)on lines 90 and 92, respectively, which are distributed to variousportions of the circuitry as illustrated.

Additionally, lines 90 and 92 are connected to an integrated circuit 94which provides a reference voltage of 1½ VDC on line 96 and a 4.1 VDCreference voltage on line 98, both of which are respectively connectedto pins 51 and 52 of the micro-controller 28. The switches 24 and 26 areconnected to pins 49 and 47, respectively, for adjusting the set pointof the thermostat and lines 100 are provided as spares for otherfunctional input signals that may be desired. The temperature measuringfunction is performed by the pair of thermistors 30 connected inparallel with one another which provide an electrical output to themicro-controller at pin 45 that is proportional to the temperature thatis sensed. In this regard, two thermistors are used to provide anaverage value for use by the micro-controller 28.

The pressure transducer 54 has positive and negative outputs which areconnected to an amplifier circuit, indicated generally at 102, whichprovides an amplified signal to pin 43 of the micro-controller.Communication with a LAN network via line 66 is provided by circuitryassociated with a RS485 transmission receiver integrated circuit 103which has lines 104that extend to pins 20 and 21 of the micro-controllerand a select line 106 that extends to pin 42 thereof.

The flow chart for the adaptive control algorithm that controls theoperation of the thermostat is shown in FIG. 5 and has a roomtemperature set point applied by a control dial switch on the thermostatitself or is supplied by a remote control station via the LANcommunication. The adaptive controlling algorithm continuouslycalculates robust controller gains required for accurate temperaturecontrol in a room. As the properties and characteristics of the roomchange, the algorithm adjusts the controller gains appropriately tomaintain robust control. The algorithm adapts particularly well togradual changes in room parameters. Sudden changes, such as a large riseor drop in the temperature of the water going to a heating or coolingcoil, cause temporary fluctuations in room temperature, as they wouldwith any controller, but the adaptive controller retunes itself andreturns the room to good control.

The algorithm is a single loop controller. One input, Y_(q)(n), from theroom temperature sensor 108 is applied via line 110 to the controller112 and it provides an output U(n) on line 114 to block 116 whichrepresents the dynamics of the room and the actuator. The output X(t)represents the temperature rise or fall in the room due to the operationof the actuator. The room model symbolically has a summing junction 118which receives the units of temperature X(t) and the load and the roomtemperature is represented by Y(t) on line 120 which is sensed by thesensor 108. The load is defined as any temperature effect in the roomwhich is not a direct result of the control efforts as applied throughthe actuator. The room temperature Y(t) is sampled by the sensor andquantized by no more than 0.25 degrees F., generating signal Y_(q)(n).

As is shown in FIG. 6, the adaptive controller 112 itself consists ofthree primary blocks, which consist of a controller block 122, a tunerblock 124 and an identifier block 126. These blocks define an algorithmfor room temperature control. The controller 122 uses the roomtemperature setpoint r(n) on line 128 and the measured room temperatureY_(q)(n) to create a control signal U(n). This signal drives an actuatorin such a way as to keep the measured room temperature at the setpoint.The identifier 126 uses the control signal from the controller and theactual room temperature signal to recursively calculate appropriateparameters for a second order room model, and outputs the parameters inthe form of a vector Q_(aux), identified at 130, and a factor k on line132 which represents the number of controller sampling periods in thecalculated room time delay. Each room has different model parameters,and these parameters can change over time. The identifier is able tozero in on these parameters and track them as they move. The tuner block124 uses the room model parameter estimates generated by the identifierand calculates appropriate controller gains, i.e., the proportional gainfactor K_(p) on line 134, the integral gain factor K_(i) on line 136 andthe derivative gain factor K_(d) on line 138, for the controller 122 touse.

Referring to FIG. 7, the controller 122 is illustrated and comprises aSmith Predictor structure with an imbedded PID controller. The estimatedroom model is used in the structure, but it is divided into two parts.The first part contains the dynamic elements of the model and the secondpart contains only a time delay. The principle of the Smith Predictor issimple; if the estimated room model is exactly right, then the signalC(n) will be equal to the output of the room, X(n) . The signal(Y_(q)(n)−C(n)) will then be equal to the load. The problem ofcontrolling the room, with its time delay, is then reduced to theproblem of controlling the dynamic part of the estimated room model withno time delay. The Smith Predictor limits if not eliminates the effectsof a time delay.

The structure of the controller 122 is shown in FIG. 7 to have a PIDcontroller 140, a room dynamic model 142 and a room delay model 144interconnected as shown. The output U(n) is applied via line 114 to theroom dynamic model 142 and the model block 142 provides an output A(n)on line 146 that is applied to the room delay model 144 and to a summingjunction 148. The output of the room delay model 144 is C(n) on line 150and it is compared with the sensed room temperature Y_(q)(n) on line 110and the difference determined by summing junction 152 is applied to thesumming junction 148 via line 154. The output of the summing junction148 appears on line 156 that is compared with temperature set point r(n)from line 128 at summing junction 158 to provide an error signal e(n) online 158 that is applied to the PID controller 140.

The PID in the controller is a standard digital PID. The P, I and Dterms are calculated separately and added together and limited betweengiven high and low limits to create the output U(n). The formulas are asfollows: P-term = K_(p) * e(n)I-term(n) = (K_(i) * e(n) * T_(s)) + I-term(n − 1)${D\text{-}{term}} = \frac{K_{d}*\left( {{e(n)} - {e\left( {n - 1} \right)}} \right)}{T_{s}}$$\begin{matrix}{{U(n)} = \quad {\left( {{P\text{-}{term}} + {I\text{-}{term}} + {D\text{-}{term}}} \right)\quad {limited}\quad {between}\quad {given}}} \\{\quad {{high}\quad {and}\quad {low}\quad {values}}}\end{matrix}$

where e(n)=input error signal, (temp., setpoint, r(n), minus theprediction error (line 156, FIG. 7)), T_(s)=controller sampling period.The foregoing discussion relating to the controller shown in FIG. 7 alsoapplies to a controller having only proportional-integral controlfunctionality. In such a controller, the above defined D-term would notbe present.

The room model includes effects from the actuator, the temperaturesensor, and the room itself. The dynamic part of the room model isrepresented by the second order equation:$\frac{A(z)}{U(z)} = \frac{{b_{1Q}*z^{- 1}} + {b_{2Q}*z^{- 2}}}{1 + {a_{1Q}*z^{- 1}} + {a_{2Q}*z^{- 2}}}$

which can be rewritten into the following vector equation:

A(n)=(−A(n−1)−A(n−2)U(n−1)U(n−2))*Q _(aux)

where Q_(aux)=(a_(1Q) a_(2Q) b_(1Q) b_(2Q))^(T), a vector containing theroom parameters.

The room delay model simply delays the signal A(n) by the time k*T_(s).The formula is:

C(n)=A(n−k)

where k is the time delay length in sample periods.

The tuner 124 calculates PID gains for the controller using theZeigler-Nichols tuning formulas. Instead of going through thepainstaking and time-consuming process of raising the P-gain insuccessive trials in order to find the “ultimate gain” (K_(max)) and theassociated period of oscillation (T₀), as the classic tuning procedurerequires, the ultimate gain and the period of oscillation are calculatedanalytically, directly from the auxiliary room model parameters. Theformulas for these calculations are:$K_{\max} = \frac{\left( {1 - a_{2Q}} \right)}{b_{2Q}}$h = 0.5 * (a_(1Q) + K_(max) * b_(1Q))$T_{o} = \frac{{Ts}*\left( {2*\pi} \right)}{\tan^{- 1}\sqrt{\frac{\left( {1 - h^{2}} \right)}{\left( {- h} \right)}}}$

The following formulas are then used to produce robust PID gains:K_(p) = 0.6 * K_(max) $K_{i} = \frac{2*K_{p}}{T_{0}}$K_(d) = 0.125 * K_(p) * T_(o)

In the event a proportional-integral controller is employed, thefollowing formulas are then used to produce robust PI gains:

K _(p)=0.45*K _(max)

K _(i)=1.2*K _(p) /T _(o)

The identifier shown in FIG. 8 is comprised of six blocks: the twodifference operators 160, 162, a time delay identifier 164, a functionalcoefficients identifier 166, a coefficients filter 168, and a stabilitysupervisor 170.

The difference operator blocks 160, 162 simply subtract the previousvalue from the current value. These blocks are required because the twoidentifier blocks 164 and 166 require only the change in a value fromsample time to sample time, not the actual value itself. The signalswhich pass through the difference operators are the output from thecontroller (U(n)), and the measured room temperature (Y_(q)(n)). Theequations used are:

Ui(n)=U(n)−U(n−1)

Yi(n)=Y _(q)(n)−Y _(q)(n−1)

The coefficients identifier determines recursively the values of a setof model parameters which cause predicted model outputs to most closelymatch the room response to the controller's action.

The algorithm used is the Recursive Instrumental Variables algorithm.The actual algorithm used, in vector/matrix formulation, is as follows:T = (−Yi(n − 1) − Yi(n − 2)  Ui(n − k − 1)  Ui(n − k − 2))^(T)W = (−h(n − 1) − h(n − 2)  Ui(n − k − 1)  Ui(n − k − 2))^(T)h(n) = W^(T) * Q_(aux) e(n) = Yi(n) − T^(T) * Q$K = \frac{{P\left( {n - 1} \right)}*W}{\left( {\beta + {T^{T}*{P\left( {n - 1} \right)}*W}} \right)}$Q(n) = Q(n − 1) + K * e(n) $\begin{matrix}{{P(n)} = \quad {\left( {1/\beta} \right)*\left( {I - \left( {K*W^{T}} \right)} \right)*{P\left( {n - 1} \right)}\quad \left( {covariance} \right.}} \\\left. \quad {{matrix}\quad {update}} \right)\end{matrix}\quad$

where β is a forgetting factor.

The coefficients filter 168 filters each of the estimated modelparameters held in vector Q. The filter 168 is required to ensure thatmodel estimates change very smoothly, which will allow the controller tocontrol more smoothly. The filter 168 used is as follows:

Q _(aux)(n)=(1−r)*Q _(aux)(n−1)+r*(Q(n))

where r is the filter factor, initially set to 0.01.

The coefficients stability supervisor 170 checks the parameter estimatescoming out of the coefficients identifier 166 to make sure that theestimated model is stable. It also checks that K_(max), coming from thetuner 124 is positive, a necessary condition for loop stability.

A stability test is performed according to the following criteria. Themodel is unstable if any of the following occurs: $\begin{matrix}{{1 + a_{1Q} + a_{2Q}} \succ 0} & \left. 1 \right) \\{{1 - a_{1Q} + a_{2Q}} \succ 0} & \left. 2 \right) \\{{a_{2Q}} \prec 1} & \left. 3 \right) \\{K_{\max}0} & \left. 4 \right)\end{matrix}$

where the subscript Q indicates a parameter from Q vector (not theQ_(aux) vector)

If any one of these conditions is satisfied, the supervisor does threethings:

1. Resets the covariance matrix to all zeros with 0.1 on the majordiagonal;

2. Sets the new Q_(aux) to the old Q_(aux), skipping the coefficientsfilter's Q update;

3. Sets the new K_(max) to the old K_(max), skipping the tuner's K_(max)update for (K_(max)≦0 only) .

The time delay identifier 164 estimates the time delay by evaluating acost function, J(kt), for different values of kt. The value of kt whichresults in the lowest J is selected as the estimated time delay, k.

The cost function is evaluated for all integers between the predefinedk_(max) and k_(min). The cost function is:

J(kt,n)=β_(k) *J(kt,n−1)+(Yi(n)−Yi(n,kt))²

where β_(k)=forgetting factor and Yi(n,kt)=predicted output differencefor given possible delay time.

The cost functions run constantly, each evaluating using a differentpossible time delay, kt. The value for the time delay which is selectedand used for parameter estimation and control is the value which resultsin the lowest J.

From the foregoing, it should be understood that a controller has beenshown and described which has many desirable attributes and advantages.The adaptive capability of the controller enables it to be installed inan application, such as the thermostat that has been described, and itwill be self-starting and self-tuning in the sense that the parametersof its internal model will be modified in response to load, equipment ortime changes. Such capability ensures effective control without externalmanipulation.

While various embodiments of the present invention have been shown anddescribed, it should be understood that various alternatives,substitutions and equivalents can be used, and the present inventionshould only be limited by the claims and equivalents thereof.

Various features of the present invention are set forth in the followingclaims.

What is claimed is:
 1. Apparatus for controlling at least one variableoutput parameter in response to a variable predetermined input parameterin a process system, said apparatus comprising: means for sensing saidvariable input parameter and generating a signal that is indicative ofsaid sensed input parameter; means for sensing the output parameter andgenerating a signal that is indicative of the sensed output parameter;processing means including memory means for storing instructions anddata relating to the operation of the apparatus, said processing meansbeing adapted to receive said signals indicative of said sensed inputand output parameters and generate an output control signal forcontrolling said output parameter; said processing means includinginstructions and data which define a controller means for controllingthe operation of said apparatus, said controller means including anadaptive controller means, an identifier means and a tuner means; saididentifier means defining a model having parameters which represent theoperational characteristics of the process system, said identifier meansoperating to monitor the operation of the adaptive controller means andselectively change the parameters of said model to improve the operationof the adaptive controller means; said adaptive controller means beingadapted to receive said electrical signal from said input sensing meansand said electrical signal from said output sensing means and producingsaid output control signal utilizing predetermined gain factors receivedfrom said tuner means; said tuner means receiving said model parametersfrom said identifier means and calculating appropriate values of saidpredetermined gain factors and applying the same to said adaptivecontroller means for use by said adaptive controller means; and, meansoperatively connected to said processing means for adjusting the valueof said variable input parameter.
 2. Apparatus as defined in claim 1further including means operatively connected to said processing meansfor communicating with a remote controlling means.
 3. Apparatus asdefined in claim 1 wherein said adaptive controller means furthercomprises a proportional-integral (PI) controller means producing anoutput control signal that comprises the sum of a proportional term andan integral term, with the respective terms having associated gainconstants K_(p) and K_(i).
 4. Apparatus as defined in claim 3 whereinsaid gain constant K_(i) is defined by the equation K _(i)=1.2*K _(p) /T₀ where K _(p)=0.45*K _(max) and$K_{\max} = \frac{\left( {1 - a_{2Q}} \right)}{b_{2Q}}$

and a_(2Q) and b_(2Q) are predetermined input parameters.
 5. Apparatusas defined in claim 1 wherein said adaptive controller means furthercomprises a proportional-derivative-integral (PID) controller meansproducing an output control signal that comprises the sum of aproportional term, a derivative term and an integral term, with therespective terms having associated gain constants K_(p), K_(d) andK_(i).
 6. Apparatus as defined in claim 5 wherein said output controlsignal from said PID controller means is applied to a dynamic modelmeans that has a dynamic model output applied to a delay model meansthat has a delay model output that is summed with said signal indicativeof said sensed output parameter to provide a first error signal, saidfirst error signal being summed with said dynamic model output toprovide a second error signal that is summed with said value of saidvariable input parameter to provide an input error signal that isapplied to said PID controller means.
 7. Apparatus as defined in claim 6wherein said adaptive controller means operates to produce an outputcontrol signal recursively each predetermined sample period. 8.Apparatus as defined in claim 7 wherein said proportional term of saidoutput control signal of said PID controller means is defined by theequation P-term=K _(p) *e(n) where e(n) is said input error signal. 9.Apparatus as defined in claim 7 wherein said derivative term of saidoutput control signal of said PID controller means is defined by theequation D-term=K _(d)*(e(n)−e(n−1))/T _(s) where: e(n) is said inputerror signal at sample time n; e(n−1) is said input error signal at theprevious sample time; and T_(s) is the sampling period.
 10. Apparatus asdefined in claim 7 wherein said integral term of said output controlsignal of said PID controller means is defined by the equation I-term=(K_(i) *e(n)*Ts)+I-term(n−1) where: e(n) is said input error signal atsample time n; I-term(n−1) is the I-term calculated at the previoussample time; and T_(s) is the sampling period.
 11. Apparatus as definedin claim 7 wherein said dynamic model output is defined by the equationA(n)=(−A(n−1)−A(n−2)U(n−1)U(n−2))*Q _(aux) where Q_(aux)=(a_(1Q) a_(2Q)b_(1Q) b_(2Q))^(T), a vector containing the model parameters. 12.Apparatus as defined in claim 7 where said delay model output comprisesthe dynamic model output from a previous number of sample periods and isdefined by the equation C(n)=A(n−k) where k is the time delay length ina predetermined number of sample periods.
 13. Apparatus as defined inclaim 11 wherein said tuner means determines a maximum proportional gainfactor prepatory to providing said appropriate values of saidpredetermined gain factors.
 14. Apparatus as defined in claim 13 whereinsaid maximum proportional gain factor K_(max) is determined analyticallyfrom said model parameters in accordance with the following equations$K_{\max} = \frac{\left( {1 - a_{2Q}} \right)}{b_{2Q}}$h = 0.5 * (a_(1Q) + K_(max) * b_(1Q))$T_{0} = \frac{T_{s}*\left( {2*\pi} \right)}{\tan^{- 1}\sqrt{\frac{\left( {1 - h^{2}} \right)}{\left( {- h} \right)}}}$

and the gain factors are determined in accordance with the followingequations ${Ki} = \frac{2*K_{p}}{T_{o}}$ K_(d) = 0.125 * K_(p) * T_(o).


15. Apparatus as defined in claim 1 wherein said predetermined inputparameter is a temperature set point and said output parameterrepresents a temperature value.
 16. An electronic digital thermostat foruse in a pneumatically controlled temperature control system of the typewhich has a pneumatic source line and pneumatic output control lines,the pressure in each control line of which controls the temperature of aparticular indoor area, said thermostat being adapted to maintain adesired ambient temperature in an indoor area, said thermostatcomprising: means for determining and adjusting the temperature setpoint of the thermostat; valve means being adapted to be operativelyconnected to the pneumatic source line and to an exhaust and having apneumatic output line, said valve means controlling the pressure in saidpneumatic output line in response to electrical control signals beingapplied to said valve means, said controlled pressure being within therange defined by the pressures of said source line and said exhaust;means for sensing the ambient temperature and generating an electricalsignal that represents the sensed temperature; means for sensing thepneumatic pressure in said pneumatic output line and generating anelectrical signal that represents the sensed pressure; processing meansincluding memory means for storing instructions and data relating to theoperation of the thermostat, said processing means being adapted toreceive electrical signals representing sensed temperature and sensedpressure, and to generate said electrical control signals forcontrolling said valve means; said memory means of said processing meansincluding instructions and data which define a controller means forcontrolling the operation of said thermostat, said controller meansincluding an adaptive controller means, an identifier means and a tunermeans; said identifier means defining a model having parameters whichrepresent the operational characteristics of the temperature controlsystem as it controls the temperature of said indoor area, saididentifier means operating to monitor the operation of the adaptivecontroller means and selectively change the parameters of said model toimprove the operation of the adaptive controller means; said adaptivecontroller means being adapted to receive said electrical signalrepresenting said sensed temperature and said electrical signalrepresenting said sensed pressure and producing said output controlsignal utilizing predetermined gain factors received from said tunermeans; said tuner means receiving said model parameters from saididentifier means and calculating appropriate values of saidpredetermined gain factors and applying the same to said adaptivecontroller means for use by said adaptive controller means; and, meansfor providing power for operating the thermostat.
 17. A thermostat asdefined in claim 16 further including means operatively connected tosaid processing means for communicating with a remote controlling means.18. Apparatus as defined in claim 16 further including means operativelyconnected to said processing means for communicating with a remotecontrolling means.
 19. Apparatus as defined in claim 16 wherein saidadaptive controller means further comprises aproportional-derivative-integral (PID) controller means producing anoutput control signal that comprises the sum of a proportional term, aderivative term and an integral term, with the respective terms havingassociated gain constants K_(p), K_(d) and K_(i).
 20. Apparatus asdefined in claim 19 wherein said output control signal from said PIDcontroller means is applied to a dynamic model means that has a dynamicmodel output applied to a delay model means that has a delay modeloutput that is summed with said signal indicative of said sensed outputparameter to provide a first error signal, said first error signal beingsummed with said dynamic model output to provide a second error signalthat is summed with said value of said variable input parameter toprovide an input error signal that is applied to said PID controllermeans.
 21. Apparatus as defined in claim 20 wherein said adaptivecontroller means operates to produce an output control signalrecursively each predetermined sample period.
 22. Apparatus as definedin claim 21 wherein said proportional term of said output control signalof said PID controller means is defined by the equation P-term=K _(p)*e(n) where e(n) is said input error signal.
 23. Apparatus as defined inclaim 21 wherein said derivative term of said output control signal ofsaid PID controller means is defined by the equation D-term=K_(d)*(e(n)−e(n−1))/T _(s) where: e(n) is said input error signal atsample time n; e(n−1) is said input error signal at the previous sampletime; and T_(s) is the sampling period.
 24. Apparatus as defined inclaim 21 wherein said integral term of said output control signal ofsaid PID controller means is defined by the equation I-term=(K _(i)*e(n)*T _(s))+I-term(n−1) where: e(n) is said input error signal atsample time n; I-term(n−1) is the I-term calculated at the previoussample time; and T_(s) is the sampling period.
 25. Apparatus as definedin claim 21 wherein said dynamic model output is defined by the equationA(n)=(−A(n−1)−A(n−2)U(n−1)U(n−2))*Q _(aux) where Q_(aux)=(a_(1Q) a_(2Q)b_(1Q) b_(2Q))^(T), a vector containing the model parameters. 26.Apparatus as defined in claim 21 where said delay model output comprisesthe dynamic model output from a previous number of sample periods and isdefined by the equation C(n)=A(n−k) where k is the time delay length ina predetermined number of sample periods.
 27. Apparatus as defined inclaim 25 wherein said tuner means determines a maximum proportional gainfactor prepatory to providing said appropriate values of saidpredetermined gain factors.
 28. Apparatus as defined in claim 27 whereinsaid maximum proportional gain factor K_(max) is determined analyticallyfrom said model parameters in accordance with the following equations$K_{\max} = \frac{\left( {1 - a_{2Q}} \right)}{b_{2Q}}$h = 0.5 * (a_(1Q) + K_(max) * b_(1Q))$T_{0} = \frac{T_{s}*\left( {2*\pi} \right)}{\tan^{- 1}\sqrt{\frac{\left( {1 - h^{2}} \right)}{\left( {- h} \right)}}}$

and the gain factors are determined in accordance with the followingequations K_(p) = 0.6 * K_(max) $K_{i} = \frac{2*K_{p}}{T_{0}}$K_(d) = 0.125 * K_(p) * T₀.


29. An electronic digital thermostat adapted for use in a pneumaticallycontrolled temperature control system of the type which has at least onepneumatic source line and at least one pneumatic output control line,the pressure in each output control line controlling the temperature ofa particular indoor area, said thermostat being adapted to maintain adesired ambient temperature in at least one particular indoor area, saidthermostat comprising: a housing for containing the various means of thethermostat, said housing having a compact overall size; means fordetermining and adjusting the temperature set point of the thermostat;valve means being adapted to be operatively connected to one pneumaticsource line and to an exhaust and having a pneumatic output line, saidvalve means controlling the pressure in said pneumatic output line inresponse to electrical control signals being applied to said valvemeans, said controlled pressure being within the range defined by thepressures that exist in said source line and said exhaust; means forsensing the ambient temperature and generating an electrical signal thatis indicative of the sensed temperature; means for sensing the pneumaticpressure in said pneumatic output line and generating an electricalsignal that is indicative of the sensed pressure; processing meansincluding memory means for storing instructions and data relating to theoperation of the thermostat, said processing means being adapted toreceive electrical signals that are indicative of sensed temperature andsensed pressure and said temperature set point, and to generate saidelectrical control signals for controlling said valve means; said memorymeans of said processing means including instructions and data whichdefine a controller means for controlling the operation of saidthermostat, said controller means including an adaptive controller meansbeing adapted to receive said electrical signal representing said sensedtemperature and said electrical signal representing said sensed pressureand producing said output control signal utilizing predetermined gainfactors; means operatively connected to said processing means forcommunicating with a remote controlling means; and, means for providingpower for operating the thermostat.
 30. A thermostat as defined in claim29 wherein said controller further includes an identifier means and atuner means; said identifier means defining a model having parameterswhich represent the operational characteristics of the temperaturecontrol system as it controls the temperature of said indoor area, saididentifier means operating to monitor the operation of the adaptivecontroller means and selectively change the parameters of said model toimprove the operation of the adaptive controller means; said tuner meansreceiving said model parameters from said identifier means andcalculating appropriate values of said predetermined gain factors andapplying the same to said adaptive controller means for use by saidadaptive controller means; said adaptive controller means utilizing saidpredetermined gain constants received from said tuner means. 31.Apparatus as defined in claim 30 wherein said tuner means determines amaximum proportional gain factor prepatory to providing said appropriatevalues of said predetermined gain factors.
 32. Apparatus as defined inclaim 31 wherein said adaptive controller means further comprises aproportional-derivative-integral (PID) controller means producing anoutput control signal that comprises the sum of a proportional term, aderivative term and an integral term, with the respective terms havingassociated gain constants K_(p), K_(d) and K_(i).
 33. Apparatus asdefined in claim 32 wherein said output control signal from said PIDcontroller means is applied to a dynamic model means that has a dynamicmodel output applied to a delay model means that has a delay modeloutput that is summed with said signal indicative of said sensed outputparameter to provide a first error signal, said first error signal beingsummed with said dynamic model output to provide a second error signalthat is summed with said value of said variable input parameter toprovide an input error signal that is applied to said PID controllermeans.
 34. Apparatus as defined in claim 33 wherein said adaptivecontroller means operates to produce an output control signalrecursively each predetermined sample period.
 35. Apparatus as definedin claim 34 wherein said proportional term of said output control signalof said PID controller means is defined by the equation P-term=K _(p)*e(n) where e(n) is said input error signal.
 36. Apparatus as defined inclaim 34 wherein said derivative term of said output control signal ofsaid PID controller means is defined by the equation D-term=K_(d)*(e(n)−e(n−1))/T _(s) where: e(n) is said input error signal atsample time n; e(n−1) is said input error signal at the previous sampletime; and T_(s) is the sampling period.
 37. Apparatus as defined inclaim 34 wherein said integral term of said output control signal ofsaid PID controller means is defined by the equation I-term=(K _(i)*e(n)*T _(s))+I-term(n−1) where: e(n) is said input error signal atsample time n; I-term(n−1) is the I-term calculated at the previoussample time; and T_(s) is the sampling period.
 38. Apparatus as definedin claim 34 wherein said dynamic model output is defined by the equationA(n)=(−A(n−1)−A(n−2)U(n−1)U(n−2))*Q _(aux) where Q_(aux)=(a_(1Q) a_(2Q)b_(1Q) b_(2Q))^(T), a vector containing the model parameters. 39.Apparatus as defined in claim 34 where said delay model output comprisesthe dynamic model output from a previous number of sample periods and isdefined by the equation C(n)=A(n−k) where k is the time delay length ina predetermined number of sample periods.